package com.code.monitor.utils;

import org.springframework.context.ApplicationContext;

public class SpringUtils {

    private static ApplicationContext context;

    public static void setAppContext(ApplicationContext appContext) {
        context = appContext;
    }

    public static <T> T getBean(Class<T> cls) {
        return context.getBean(cls);
    }

}
